﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using System.Data.Objects;

namespace BaseLib.Data
{
    public abstract class BaseDataRepository<TContext>
        where TContext : ObjectContext, new()
    {
        public TContext DBContext { get; set; }

        public BaseDataRepository(TContext context)
        {
            DBContext = context;
        }

        public BaseDataRepository()
        {
            DBContext = ContextHelper<TContext>.GetCurrentContext();
        }
    }
}
